home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / Plug-in - QuickDraw Renderer / IRS_Register.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  1.9 KB  |  75 lines  |  [TEXT/CWIE]

  1. /******************************************************************************\
  2.                                                                         
  3.         Module:        IRS_Register.c                                            
  4.                                                                             
  5.         Purpose:     plug-in renderer's registration methods                                
  6.                                                                         
  7.         Author:        Sun-Inn Shih                                        
  8.                                                                         
  9.         Copyright (C) 1993-96 Apple Computer, Inc.  All rights reserved.    
  10.                                                                             
  11. \*****************************************************************************/
  12.  
  13. #include <QD3D.h>
  14. #include <QD3DRenderer.h>
  15. #include <QD3DExtension.h>
  16. #include "IRS_MetaHandler.h"
  17. #include "IRShell.h"
  18.  
  19. TQ3XObjectClass    RendererClass;
  20.  
  21. #include <CodeFragments.h>
  22.  
  23. extern "C" {
  24. OSErr IRSRegister(
  25.     void);
  26.  
  27. long IRSExit(
  28.     void);
  29. }
  30. /*===========================================================================*\
  31.  *
  32.  *    Routine:    IRSRegister()
  33.  *
  34.  *    Purpose: Register an object class in the QuickDraw 3D hierarchy.
  35.  *
  36.  *    QD3D calls: Q3XObjectHierarchy_RegisterClass() in QD3DExtentionl.h
  37.  *
  38. \*===========================================================================*/
  39. OSErr IRSRegister(
  40.     void)
  41. {
  42.     TQ3ObjectType    classType;                         /* This is returned from QD3D */
  43.             
  44.     RendererClass =
  45.             Q3XObjectHierarchy_RegisterClass(        /* register into QD3D hierarchy */
  46.                 kQ3SharedTypeRenderer,                /* parent type - a existing type */
  47.                 &classType,                            /* the new object class type */
  48.                 "IR Shell",                            /* name, used in the text metafile */
  49.                 IRSMetaHandler,                      /* metahandler */                
  50.                 NULL,                                /* virtual meta handler*/    
  51.                 0,                                    /* methods Size */
  52.                 sizeof(struct irsData));            /* size of the object instandce data */
  53.  
  54.     if(RendererClass == NULL)
  55.     {
  56.         return kQ3Failure;
  57.     }
  58.     
  59.     return noErr;
  60. }
  61.  
  62. /*===========================================================================*\
  63.  *
  64.  *    Routine:    IRSExit()
  65.  *
  66.  *    Comments:    exit share library
  67.  *
  68. \*===========================================================================*/
  69.  
  70. long IRSExit(
  71.     void)
  72. {
  73.     return 0;
  74. }
  75.